$(function(){
	setTimeout("changesaying()",50000);
});
var times=0;
function changesaying()
	{
		if(times<=5)
		{
			$.get("action/saying.php",function(data){
				$('#saying-panel').removeClass('am-animation-slide-left');
				$('#saying-panel').addClass('am-animation-reverse am-animation-slide-right');
				setTimeout("showsaying('"+data+"')",1000);
				times++;
			});
		}
		
		
	}
	function showsaying(data)
	{
		$('#saying').html(data);
		$('#saying-panel').removeClass('am-animation-reverse am-animation-slide-right');
			$('#saying-panel').addClass('am-animation-slide-left');
			setTimeout("changesaying()",50000);
	}